<template>
    <div>
        <document-tab :tab-list="myTabList">
            <template slot-scope="{item}">
                <list-table :params="item.params" :badgeNum.sync="item.badgeNum"></list-table>
            </template>
          <template slot="right-btn">
            <p class="more">
              <my-link @to="goto">更多</my-link>
            </p>
          </template>
        </document-tab>
    </div>
</template>
<script>
    import MyLink from "../../../components/MyLink/index";
    import DocumentTab from "@/components/Common/DocumentTab";
    import ListTable from "./ListTable";
    import MyCard from '../../../components/Common/MyCard'

    export default {
        name: "HomeDuty",
        props: ["info"],
        data() {
            return {
                list: [],
                total: 0,
                myTabList:[
                    {
                        label: "我的待办",
                        name: "daiban",
                        params: {category: 'duty'},
                        badgeNum: 0,
                        formatter: (data) => {
                            return data
                        },
                        hasBadge: true
                    },
                    {
                        label: "我的已办",
                        name: "yiban",
                        params: { category: 'relation'},
                        badgeNum: 0,
                        formatter: (data) => {
                            return data
                        }
                    },
                    {
                        label: "我的待阅",
                        name: "daiyue",
                        params: { category: 'daiyue'},
                        badgeNum: 0,
                        formatter: (data) => {
                            return data
                        },
                        hasBadge: true
                    },
                    {
                        label: "我的申请",
                        name: "faqi",
                        params: {category: 'owner'},
                        badgeNum: 0,
                        formatter: (data) => {
                            return data
                        }
                    },
                ]
            }
        },
        created() {
        },
        computed: {},
        components: { MyCard, ListTable, DocumentTab, MyLink},
        methods: {
            goto() {
                this.$router.push({path: "allWorkflow"});
            },
        }
    }
</script>
<style lang="scss" scoped>
    ::v-deep.app-container{
        margin: 0;
        margin: 15px 0px 15px 15px;
        border-radius: 3px;
        padding-bottom: 0;
    }
  .more{
    position: absolute;
    right:20px;
    top: 10px;
    line-height: 35px;
    font-size: 14px;
  }
</style>
